

#pragma once

#ifndef _WINDOWS_
#include <windows.h>
#endif
#include <stdio.h>


#define MAX_DEPTH	100
#define bitchk( var, bit )		( ( ( var & bit ) == bit ) ? 1 : 0 )

class filelist
{
	HANDLE				hFileList[MAX_DEPTH];
	char				paths[MAX_DEPTH][MAX_PATH];		// strcpy( paths[index], curpath );
	int					index;
	WIN32_FIND_DATA		fd;
	BOOL				isstarted;
	BOOL				recursivemode;

public:
	filelist();
	~filelist();
	BOOL start( char *startpath, BOOL recursive = TRUE );	// c:\windows\*
	BOOL GetNextFile( OUT char *filepath, OPTIONAL OUT BOOL *pbNoMoreFiles = NULL );
};





